<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script type="text/javascript">
		
		str = "zhi9bin_";

		preg = /^[A-Za-z]\w{4,6}[A-Za-z0-9]$/;

		if(preg.test(str)){
			alert('ok')
		}else{
			alert('error');
		}



	</script>
</head>
<body>
	
</body>
</html>